#include<stdio.h>

int main()
{
	long n,t;
	int i=0,m[11]={0},flag,sign,key=1,sum=0;
	scanf("%ld",&n);
	t=n;
	while(t!=0)
	{
		m[i++]=t%10;
		sum+=t%10;
		t/=10;
	}
	for(sign=0,flag=i-1;sign<i/2;sign++,flag--)
	{
		if(m[sign]!=m[flag]) key=0;
	}
	if(key==1) printf("%d",sum);
	else printf("no");
	return 0;
}
